<link href="/static/js/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="/static/js/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
<body>
<div class="container-fluid">
	<div class="page-header" style="margin: 20px 0 20px;">
	    <span style="margin:0 0 20px 10px;">当前位置：权限项列表 </span>
	    <a style="position: relative;float: right;margin: 0 50px 20px 0;" href="?g=menu&r=adMenu/addpage">添加权限项</a>
	</div>
    <table class="table table-hover table-condensed">
    <thead>
      <tr>
        <th width="20%" >&nbsp;&nbsp;项目名称</th>
        <th width="20%" >&nbsp;&nbsp;操作KEY</th>
        <th width="10%" >&nbsp;&nbsp;权限项类型</th>
        <th width="35%" >&nbsp;&nbsp;动作</th>
        <th width="15%" >操作</th>
      </tr>
     </thead>
     <tbody>
      {if !empty($parentmenu)}
      {foreach $parentmenu as $pval}
       <tr>
          <td height="30" >&nbsp;&nbsp;{$pval["name"]}</td>
          <td height="30" >{$pval["action_key"]}</td>
          <td height="30" >{if $pval["type"] == 1}菜单权限{else}操作权限{/if}</td>
          <td height="30" >{$pval["action"]}</td>
          <td >
              <a href="?g=menu&r=adMenu/addpage&menuid={$pval["menuid"]}">编辑</a>
              <!-- <a href="#">删除</a> -->
          </td>
       </tr>
       {if key_exists($pval['menuid'],$menu)}
       {foreach $menu[$pval["menuid"]] as $sval}
        <tr>
          <td height="30" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;┗ {$sval["name"]}</td>
          <td height="30" >{$sval["action_key"]}</td>
          <td height="30" >{if $sval["type"] == 1}菜单权限{else}操作权限{/if}</td>
          <td height="30" >{$sval["action"]}</td>
          <td >
             <a href="?g=menu&r=adMenu/addpage&menuid={$sval["menuid"]}">编辑</a>
              <!-- <a href="#">删除</a> -->
          </td>
       </tr>
       {/foreach}
       {/if}
      {/foreach}
      {/if}
      </tbody>
    </table>
</div>
</body>